import Vue from 'vue'

export function getResumeLists(opts) {
    return Vue.axios.post('/cvdbSupplier/listNeedsCvdbInfo.do', {
        needsCode: opts.demandNo,
        postCode: opts.jobName,
        NeedsCreater: opts.sendName,
        status: opts.status,
        pageCurrent: opts.currentPage,
        pageSize: opts.pageSize,
    });
}


export function getResumeDetailInfo(opts) {
    return Vue.axios.post('/cvdbSupplier/getNeedsDetails.do', {
        needsId: opts.needsId
    });
}
export function getResumeSelectDetailInfo(opts) {
    return Vue.axios.post('/cvdbSupplier/getCvdbDetails.do', opts);
}
export function delDetailUploadFileByPath(opts) {
    return Vue.axios.post('/cvdbSupplier/removeFile.do', {
        filePath: opts.uploadFileUrl
    });
}

export function getSelectResumeLists(opts) {
    return Vue.axios.post('/cvdbSupplier/listCvdbs.do', opts);
  //   {
  //     needsCode: opts.demandNo,
  //     postCode: opts.jobName,
  //     name: opts.sendName,
  //     createDate: '',
  //     isselected: opts.status,
  //     pageCurrent: opts.currentPage,
  //     pageSize: opts.pageSize
  // }
}

export function saveResumeInfo(opts) {
    return Vue.axios.post('/cvdbSupplier/createSelective.do', {
        surname: opts.candidate,
        educationCode: opts.educational,
        workExperience: opts.handsOn,
        currentStatusCode: opts.jobStatus,
        postTime: opts.availableTime,
        telephone: opts.candidatePhone,
        reason: opts.reason,
        needsId: opts.id,
        uploaderName: opts.uploadName,
        uploaderEmail: opts.uploadEmail,
        uploaderMobile: opts.uploadPhone,
        fileUrl: opts.uploadFileUrl.file,
        fileName: opts.uploadFileUrl.name,
        needsUpdater: opts.needsUpdater
    });
}
